﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace DevKnightlie.WPF.AutoForm.Tests
{
    /// <summary>
    /// Real-world-ish view model class for testing purposes
    /// </summary>
    class TestModelClass : INotifyPropertyChanged
    {
        private string _inputFilename;
        private string _outputFilename;
        private int _rowsPerGroup;
        private DateTime _cutoffDate;

        public String InputFilename
        {
            get { return _inputFilename; }
            set
            {
                _inputFilename = value;
                NotifyPropertyChanged("InputFilename");
            }
        }

        public String OutputFilename
        {
            get { return _outputFilename; }
            set
            {
                _outputFilename = value;
                NotifyPropertyChanged("OutputFilename");
            }
        }


        public int RowsPerGroup
        {
            get { return _rowsPerGroup; }
            set
            {
                _rowsPerGroup = value;
                NotifyPropertyChanged("RowsPerGroup");
            }
        }

        public DateTime CutoffDate
        {
            get { return _cutoffDate; }
            set
            {
                _cutoffDate = value;
                NotifyPropertyChanged("CutoffDate");
            }
        }


        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
